﻿using System.Collections.Generic;
using System.Runtime.Serialization;

namespace IMDBApi.Contracts.Entities.Search
{
    [DataContract]
    public class Search
    {
        [DataMember(Name = "data")]
        public Data Data { get; set; }
    }

    [DataContract]
    public class Data
    {
        [DataMember(Name = "results")]
        public List<Result> Results { get; set; }
    }

    [DataContract]
    public class Result
    {
        [DataMember(Name = "label")]
        public string Label { get; set; }

        [DataMember(Name = "list")]
        public List<List> List { get; set; }
    }

    [DataContract]
    public class List
    {
        [DataMember(Name = "nconst")]
        public string Nconst { get; set; }

        [DataMember(Name = "known_for")]
        public string KnownFor { get; set; }

        [DataMember(Name = "name")]
        public string Name { get; set; }

        [DataMember(Name = "image")]
        public Image Image { get; set; }

        [DataMember(Name = "tconst")]
        public string Tconst { get; set; }

        [DataMember(Name = "type")]
        public string Type { get; set; }

        [DataMember(Name = "title")]
        public string Title { get; set; }

        [DataMember(Name = "year")]
        public string Year { get; set; }
    }

    [DataContract]
    public class Image
    {
        [DataMember(Name = "width")]
        public int Width { get; set; }

        [DataMember(Name = "url")]
        public string Url { get; set; }

        [DataMember(Name = "height")]
        public int Height { get; set; }
    }
}
